#pragma once
#include "CPlayer.h"
#include "static_reg.h"

class CPlayerMgr : public Singleton<CPlayerMgr>
{
public:
	std::unordered_map<string, std::unique_ptr< CPlayer>> m_channelId2player;

public:
	CPlayer* Find(const string& channelId);
	CPlayer* CreatePlayer(const string& channelId);
	void DelPlayer(const string& channelId, bool isSave=true);
	void OnFiveMinute();

};


extern CPlayerMgr& gPlayerMgr;